package com.cy.ppj.dao.mapper.account;

import com.cy.ppj.model.domian.order.CommissionRecord;
import com.cy.ppj.model.dto.commission.CommissionDTO;
import com.cy.ppj.model.query.CommissionRecordQuery;
import com.cy.ppj.model.query.commission.CommissionRecordAdminQuery;
import com.cy.ppj.model.vo.CommissionRecordVO;
import com.cy.ppj.model.vo.admin.commission.CommissionRecordAdminVO;
import com.cy.ppj.model.vo.admin.order.OrderCommissionAdminStatisticsVO;

import java.util.Date;
import java.util.List;

import com.cy.ppj.model.vo.front.account.CommissionInfoVO;
import com.cy.ppj.model.vo.front.account.CommissionStatisticsVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import tk.mybatis.mapper.common.BaseMapper;

@Mapper
public interface CommissionRecordMapper extends BaseMapper<CommissionRecord> {

    CommissionDTO selectCommissionInfo(Long orderId);

    CommissionDTO selectCommissionInfo2(@Param("orderId") Long orderId);

    OrderCommissionAdminStatisticsVO selectOrderCommissionAdminStatistics();

    int selectCommissionRecordCount(CommissionRecordQuery commissionRecordQuery);

    List<CommissionRecordVO> selectCommissionRecord(CommissionRecordQuery commissionRecordQuery);

    List<CommissionStatisticsVO> selectCommissionStatisticsByUserId(@Param("userId") Long userId, @Param("startTime") Date startTime, @Param("endTime") Date endTime);

    CommissionInfoVO selectUserCommissionInfo(@Param("userId") Long userId, @Param("startTime") Date startTime, @Param("endTime") Date endTime);

    CommissionInfoVO selectUserCommissionInfo2(@Param("userId") Long userId);

	int selectCommissionRecordAdminCount(CommissionRecordAdminQuery query);

	List<CommissionRecordAdminVO> selectCommissionRecordAdminList(CommissionRecordAdminQuery query);
}
